package com.bw.shopping.adapter;

import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.bw.shopping.R;
import com.bw.shopping.entity.ListOrder;
import com.bw.shopping.entity.OrderEntity;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;

public
/**
 * @author Lishaohe
 * @description:
 * @date :2021/10/29 0029 下午 2:26
 *
 */
class OrderAdapter extends BaseQuickAdapter<ListOrder, BaseViewHolder> {
    public OrderAdapter( ) {
        super(R.layout.item_order_goods);
    }


    @Override
    protected void convert(BaseViewHolder baseViewHolder, ListOrder listOrder) {
        Glide.with(getContext())
                .load(listOrder.getGoods_icon())
                .into((ImageView) baseViewHolder.getView(R.id.mGoodsIconIv));
        baseViewHolder.setText(R.id.mGoodsDescTv,listOrder.getGoods_desc());
        baseViewHolder.setText(R.id.mGoodsSkuTv,listOrder.getGoods_sku());
        baseViewHolder.setText(R.id.mGoodsPriceTv,listOrder.getGoods_price());
        baseViewHolder.setText(R.id.mGoodsCountTv,listOrder.getGoods_count()+"");
    }
}
